#ifndef __SHELLLIB_H
#define __SHELLLIB_H

#ifdef __cplusplus
extern "C" {
#endif

#define CMD_LEN_SIZE  256
#define SHELL_PROMPT  "$"
#define EXIT		  "exit"
#define DIR_LEN       10	

// Define the code status.
#define SUCCESS      0
#define UNEXIST     -1
#define UNSUPPORTED -2

// Define the internal funtion format.
typedef int (*CmdFunction)(int argc,char *argv[]);
typedef struct{
	char *cmd;
	char *help_info;
	CmdFunction function;
}INTERNAL_FUNTION;
extern INTERNAL_FUNTION Cmd_Funtion_table[];
#define internal_fun_len (sizeof(Cmd_Funtion_table) / sizeof(INTERNAL_FUNTION))

//char *get_input();
void printf_prompt(const char *prompt);
int get_input(char *buf);
int check_exit(const char *cmdlist);
void do_list_cmd(char *cmdlist);

#ifdef __cplusplus
}
#endif

#endif // #ifndef __SHELLLIB_H


